import { createBrowserRouter } from 'react-router-dom';
import Layout from './layout';
import Chat from './pages/chat';
import Settings from './pages/Settings';

// 智能体相关页面
import AgentList from './pages/agent';
import AgentEdit from './pages/agent/Edit';
import AgentTrain from './pages/agent/Train';

export default createBrowserRouter([
  {
    path: '/',
    element: <Layout />,
    children: [
      {
        index: true,
        element: <Chat />,
      },
      {
        path: 'chat',
        children: [
          {
            index: true,
            element: <Chat />,
          },
          {
            path: 'new',
            element: <Chat />,
          },
          {
            path: ':conversationId',
            element: <Chat />,
          },
          {
            path: 'agent/:agentId',
            element: <Chat />,
          },
        ],
      },
      {
        path: 'agent',
        children: [
          {
            index: true,
            element: <AgentList />,
          },
          {
            path: 'create',
            element: <AgentEdit />,
          },
          {
            path: 'edit/:id',
            element: <AgentEdit />,
          },
          {
            path: 'train/:id',
            element: <AgentTrain />,
          },
        ],
      },
      {
        path: 'settings',
        element: <Settings />,
      },
    ],
  },
]); 